{extend name='layout/base' /}
{block name='title'}用户列表{/block}
{block name='contentHeader'}
<h1>
    用户管理
    <small>用户列表</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
    <li class="active">用户列表</li>
</ol>
{/block}
{block name='content'}
<!-- /.box -->
<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title">用户 共有<strong style="color:red;">{$adminCount}</strong>名</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <!-- search form -->
        <form action="" method="get" class="sidebar-form0" style="width:80%;margin: 0 auto;">
            <div class="input-group">
                <input type="text" name="q" class="form-control" value="{:$q ? $q : '';}" placeholder="请输入用户名称...">
                <span class="input-group-btn">
                    <button type="submit" id="search-btn" class="btn btn-flat">
                        <i class="fa fa-search"></i>
                    </button>
                </span>
            </div>
        </form>
        <!-- /.search form -->
        <table class="table table-bordered">
            <tr>
                <th>电话号码</th>
                <th>用户姓名</th>
                <th>工作单位</th>
                <th>用户角色</th>
                <th>注册时间</th>
                <th>操作</th>
            </tr>
            {volist name='list' id='admin'}
            <tr>
                <td>{$admin.tel}</td>
                <td>{$admin.admin_name}</td>
                <td>{$admin.unit}</td>
                <td>{:config('rbac.RBAC_ROLES')[$admin.admin_role]}</td>
                <td>{$admin.admin_time}</td>
                <td>
                    <a href="{:url('Admin/edit',['admin_id' => $admin.admin_id,'page' => $page,'q' => $q])}" class="badge bg-green">编辑</a>
                    <a href="{:url('Admin/del',['admin_id' => $admin.admin_id])}" class="badge bg-red">删除</a>
                </td>
            </tr>
            {/volist}
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer clearfix">
        <ul class="pagination pagination-sm no-margin pull-right">
            {$list|raw}
        </ul>
    </div>
</div>
<!-- /.box -->
{/block}